package com.hbnu.service;

import com.hbnu.dao.UserDao;

import javax.annotation.Resource;

public class UserService {
    @Resource(name = "userDao")
    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    //目标类
    public void  addUser(){
        //传统是new对象调用这个方法，我们此时用容器获取目标类，来调用方法
        //spring就是管理对象
        //System.out.println("add user by userService");
        userDao.addUser();
    }

    public void account(){
        userDao.leesMoney();



        userDao.moreMoney();
    }
}
